<div class="wrapper-md" ng-controller="flowInfo">
    <toaster-container toaster-options="{'position-class': 'toast-top-center', 'close-button':true}"></toaster-container>
    <div ng-if="warehouseList" class="panel panel-default">
        <div class="panel-heading">
            {{title.title}}
            <!--<button style="float: right;margin-top: -5px;margin-left: 15px;" class="btn m-b-xs btn-sm btn-info btn-addon">-->
            <!--<i class="fa fa-trash-o"></i>删除-->
            <!--</button>-->
            <button ng-click="warehouseJump()"  style="float: right;margin-top: -5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>新建
            </button>
        </div>
        <div class="panel-body b-b b-light">
            搜索: <input id="filter" type="text" class="form-control input-sm w-sm inline m-r"/>
        </div>
        <div>
            <table class="table m-b-none" ui-jq="footable" data-filter="#filter" data-page-size="10">
                <thead>
                <tr>
                    <th data-toggle="true">{{columns[0].title}}</th>
                    <th>{{columns[1].title}}</th>
                    <th>{{columns[2].title}}</th>
                    <th>{{columns[3].title}}</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="tb in saveDate">
                    <td>{{tb.createTime}}</td>
                    <td><a href ng-click="showInfo(tb)">{{tb.useDb}}</a></td>
                    <td>{{tb.useDbUrl}}</td>
                    <td data-value="1"><span class="{{tb.status1}}" title="Active">{{tb.status}}</span></td>
                </tr>
                </tbody>
                <tfoot class="hide-if-no-paging">
                <tr>
                    <td colspan="5" class="text-center">
                        <ul class="pagination"></ul>
                    </td>
                </tr>
                </tfoot>
            </table>


        </div>
    </div>
    <div ng-if="warehouseAdd" class="panel panel-default">
        <div class="panel-heading">
            <u style="cursor:pointer"  ng-click="warehouseJump()">{{title.title}}</u> / {{title.addTitle}}
            <button ng-click="saveInfo('sm')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>保存
            </button>
            <button ng-click="warehouseJump()" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-hand-o-left"></i>返回
            </button>
        </div>
        <div class="panel-body">
            <h3 style="text-align: center"><b>流程信息</b></h3>
            <form class="form-horizontal" method="get">
                <h7><b>流程基本信息</b></h7><h9 style="color:red">(提示：第一环节编号必须是‘001’,名称为‘提单’，且上一环节信息必须是空；最后一环节的下一环节信息必须为空；异常的流程信息会使业务流程完全奔溃！请谨慎配置)</h9>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-1">制&nbsp;&nbsp;单&nbsp;&nbsp;人</label>
                    <div class="col-sm-4">
                        <input readonly type="text" class="form-control" id="zdr" value="{{row.zdr}}">
                    </div>
                    <label class="col-sm-2 control-label" for="input-id-1">制单日期</label>
                    <div class="col-sm-4">
                        <input readonly id="createTime" value="{{row.createTime}}" type="text" class="form-control" ng-required="true" />
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-2"><span style="color:red">*</span>使用模块</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" id="useDb" value="{{row.useDb}}">
                    </div>
                    <label class="col-sm-2 control-label" for="input-id-3"><span style="color:red">*</span>模块url</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" id="useDbUrl" value="{{row.useDbUrl}}">
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-1">是否启用</label>
                    <label class="i-switch m-t-xs m-r">
                        <input ng-checked="{{row.flowInfoUse}}" type="checkbox" id="flowInfoUse">
                        <i></i>
                    </label>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <h7><b>环节明细信息</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div style="height: 35px;">
                    <button ng-click="addRows()" style="" class="btn m-b-xs btn-sm btn-success btn-addon">
                        <i class="fa fa-plus"></i>添加
                    </button>
                    <button ng-click="plsc()" style="" class="btn m-b-xs btn-sm btn-danger btn-addon">
                        <i class="fa fa-minus"></i>批量删除
                    </button>
                </div>
            </form>
            <table class="table m-b-none" style="border:1px solid #eaeff0;" border="" cellspacing="0px" cellpadding="0px" width="100%">
                <thead>
                <tr>
                    <th><input class="checkbox" type="checkbox" ng-click="qx()"/></th>
                    <th style="vertical-align: middle;white-space:nowrap;">环节编号</th>
                    <th style="vertical-align: middle;white-space:nowrap;">环节名称</th>
                    <th style="vertical-align: middle;white-space:nowrap;">上一环节</th>
                    <th style="vertical-align: middle;white-space:nowrap;">上一环节编号</th>
                    <th style="vertical-align: middle;white-space:nowrap;">下一环节</th>
                    <th style="vertical-align: middle;white-space:nowrap;">下一环节编号</th>
                    <th style="vertical-align: middle;white-space:nowrap;">审批人</th>
                    <!--<th style="vertical-align: middle;white-space:nowrap;">提交</th>-->
                    <th style="vertical-align: middle;white-space:nowrap;">编辑</th>
                    <!--<th style="vertical-align: middle;white-space:nowrap;">退回</th>-->
                    <th style="vertical-align: middle;white-space:nowrap">操作</th>
                </tr>
                </thead>
                <tbody id="table">
                <tr ng-repeat="g in goods">
                    <td><input type="checkbox" name="ck" ng-click="ck($index)"></td>
                    <td><input ng-model="goods[$index].flowDetailsNumber" type="text" class="form-control" value="{{g.flowDetailsNumber}}"/></td>
                    <td><input ng-model="goods[$index].flowDetailsName" type="text" class="form-control" value="{{g.flowDetailsName}}"/></td>
                    <td><input ng-model="goods[$index].flowDetailsUp" type="text" class="form-control" value="{{g.flowDetailsUp}}"/></td>
                    <td><input ng-model="goods[$index].flowDetailsUpId" type="text" class="form-control" value="{{g.flowDetailsUpId}}"/></td>
                    <td><input ng-model="goods[$index].flowDetailsDown" type="text" class="form-control" value="{{g.flowDetailsDown}}"></td>
                    <td><input type="text" ng-model="goods[$index].flowDetailsDownId" class="form-control" value="{{g.flowDetailsDownId}}"/></td>
                    <td>
                        <a href="" ng-click="showSelectUser($index)" class="active" ui-toggle-class="">
                            <i class="fa fa-plus" id="{{g.flowDetailsId}}flowDetailsFzr">{{g.flowDetailsFzr}}</i>
                        </a>
                    </td>
                    <!--<td><input ng-true-value="'true'" ng-false-value="'false'" ng-model="goods[$index].tiJiao" ng-checked="{{g.tiJiao}}" type="checkbox" id="tiJiao"></td>-->
                    <td><input ng-true-value="'true'" ng-false-value="'false'"  ng-model="goods[$index].baoCun" ng-checked="{{g.baoCun}}" type="checkbox" id="baoCun"></td>
                    <!--<td><input ng-true-value="'true'" ng-false-value="'false'"  ng-model="goods[$index].tuiHui" ng-checked="{{g.tuiHui}}" type="checkbox" id="tuiHui"></td>-->
                    <td>
                        <a ng-click="dele($index)" class="active" ui-toggle-class="">
                            <i class="fa fa-times text-danger text-active"></i>
                        </a>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="line line-dashed b-b line-lg pull-in"></div>

        </div>
    </div>
</div>

<script type="text/ng-template" id="myModalContent.html">
    <div ng-include="'tpl/modal.html'"></div>
</script>
<script type="text/ng-template" id="selectUser.html">
    <div ng-include="'tpl/selectUser.html'"></div>
</script>